package cn.edu.nju.software.cdiy.dao;

import java.util.TimerTask;

import javax.servlet.ServletContext;

import org.apache.struts2.util.ServletContextAware;

import com.opensymphony.xwork2.util.logging.Logger;

public class BirthdayReminderTimerTask extends TimerTask implements ServletContextAware{
	  /*通过实现ServletContextAware可获得servletContext*/
	  private ServletContext servletContext;
	
	  @Override
	  public void run() {
//	    logger.debug("BirthdayReminderTimerTask is running");
	    setServletContext(servletContext);
	    try {
	      System.out.println("fasdhfjkasdfhjasdk");
	    } catch (Exception e) {
	      e.printStackTrace();
	    }
	  }
	  public void setServletContext(ServletContext servletContext) {
	    this.servletContext = servletContext;    
	  }
	}